import React, { Component } from 'react';
import { changeNav } from '../../actions'
import { connect } from 'react-redux'
import Counter from '../../components/Counter.js';

class test1 extends Component{
	componentDidMount(){
		// 需要修改
		this.props.changeNav({title:"test1"})
	}
	render(){
		return (
			<div>
				<Counter/>
			</div>
		);
	}
}

const mapStateToProps = (state) => ({
 
})

const mapDispatchToProps = (dispatch) => {
  return{
    changeNav:navobj => dispatch( changeNav( navobj ) )
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(test1)